<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
    <head>
        <title>计数器</title>
    </head>
    <body>

        <c:set var="counter" value="${ sessionScope.counter + 1 }" scope="session" />
        <p>您是第${ sessionScope.counter }次访问</p>

        <c:set var="counter" value="${ applicationScope.counter  + 1 }" scope="application" />
        <p>总共访问${ applicationScope.counter }次</p>

    </body>
</html>
